<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="shared/css_js::header">
	<title>jQuery WeUI</title>
	<link rel="stylesheet" type="text/css" href="/static/css/weuicss/weui.min.css"/>
</head>
<style>
	.weui-grid:after{
		border-bottom: 0;
	}
</style>
<body>

<!--底部-->
<nav th:replace="shared/foot :: foot" class="mui-bar mui-bar-tab">
</nav>
<header class="mui-bar mui-bar-nav">
	<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	<h1 class="mui-title"><font size="4"><b>个人中心</b></font></h1>
</header>
<link rel="stylesheet" type="text/css" th:href="@{/css/personcss/person.css}"/>
<div class="mui-content">
	<div class="cyh_info">
		<img th:src="${user.headimgurl}" th:if="${custname!=null}" onclick="personmessage()" style="margin: 1px"/>
		<img src="../img/my/user.png" th:if="${custname==null}" style="margin: 1px"/>
		<div class="cyh_info_1" onclick="login()" th:if="${custname==null}" th:text="请登录"></div>
		<div class="cyh_info_1" onclick="exitlogin()" th:if="${custname!=null}" th:text="退出登录"></div>
		<div class="cyh_info_2" th:if="${custname==null}">
			<span  >爱卡特,值得爱!</span>
		</div>
		<div class="cyh_info_2">
			<span th:if="${custname!=null}" th:text="${user.nickname}+'   欢迎您!'"></span>
		</div>
	</div>
	<div class="weui-grids" style="padding:2px 0px;background-color: white"  th:if="${car!=null}">
		<a href="javascript:void(0)" class="weui-grid js_grid" style="border-bottom:none;padding: 5px">
			<h2 class="weui-media-box__title" align="center"><font size="4"><b th:if="${custname!=null}" th:text="${car.brandname+car.carlinename}"></b></font></h2>
			<p class="weui-media-box__desc" align="center"  th:text="${car.carvol+'   '+car.caryear}" style="white-space:nowrap;overflow: hidden;-ms-text-overflow: ellipsis;text-overflow: ellipsis;"></p>
		</a>
		<a href="javascript:void(0)" class="weui-grid js_grid" style="border-bottom: none;padding: 5px">
			<h2 class="weui-media-box__title" align="center"><font size="4"><b>行驶里程</b></font></h2>
			<p class="weui-media-box__desc" align="center" th:if="${car.curkilo!=null}" th:text="${car.curkilo}+'KM'">0</p>
			<p class="weui-media-box__desc" align="center" th:if="${car.curkilo==null}" >无</p>
		</a>
		<a href="javascript:void(0)" class="weui-grid js_grid" style="border-bottom: none;padding: 5px">
			<h2 class="weui-media-box__title" align="center"><font size="4"><b>上路时间</b></font></h2>
			<p class="weui-media-box__desc" align="center" th:if="${car.regdate!=null}" th:text="${car.regdate}">2017-1-1</p>
			<p class="weui-media-box__desc" align="center" th:if="${car.regdate==null}" >无</p>
		</a>
	</div>
	<div class="weui-cells" style="margin-top: 0px">
		<div class="weui-cell weui-cell_access" style="line-height:1" onclick="myaccount()">
			<div class="weui-cell__hd"><i class="fa fa-address-book" style="color: black;padding-top: 5px;padding-left:5px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<p>我的账户</p>
			</div>
			<div class="weui-cell__ft"></div>
		</div>
		<div class="weui-cell weui-cell_access" style="line-height:1" onclick="order()">
			<div class="weui-cell__hd"><i class="fa fa-cart-arrow-down fa-lg" style="color: black;padding-top: 5px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<p>我的订单</p>
			</div>
			<div class="weui-cell__ft" >
				<p th:if="${custname!=null}" th:text="${ordernum.ordernum}+'条'"></p>
			</div>
		</div>
		<div class="weui-cell weui-cell_access" style="line-height:1" onclick="myservbook()">
			<div class="weui-cell__hd"><i class="fa fa-clock-o fa-lg" style="color: black;padding-top: 5px;padding-left:2px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<p>我的预约</p>
			</div>
			<div class="weui-cell__ft"></div>
		</div>
		<div class="weui-cell weui-cell_access" style="line-height:1" onclick="coupon()">
			<div class="weui-cell__hd"><i class="fa fa-gift fa-lg" style="color: black;padding-top: 5px;padding-left: 2px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<p style="margin-left: 2px">优惠券</p>
			</div>
			<div class="weui-cell__ft" >
				<p th:if="${custname!=null}" th:text="'可用'+${couponnum.couponnum}+'张'"></p>
			</div>
		</div>
		<div class="weui-cell weui-cell_access" style="line-height:1" onclick="mytc()">
			<div class="weui-cell__hd"><i class="fa fa-book" style="color: black;padding-top: 5px;padding-left: 2px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<p style="margin-left: 2px">我的套餐</p>
			</div>
			<div class="weui-cell__ft"></div>
		</div>
		<div class="weui-cell weui-cell_access" style="line-height:1" onclick="mymessage()">
			<div class="weui-cell__hd"><i class="fa fa-envelope" style="color: black;padding-top: 5px;padding-left: 2px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<p style="margin-left: 2px">我的消息</p>
			</div>
			<div class="weui-cell__ft"></div>
		</div>
		<div class="weui-cell weui-cell_access" style="line-height:1" onclick="mycar()">
			<div class="weui-cell__hd"><i class="fa fa-car" style="color: black;padding-top: 5px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<p>常用车型</p>
			</div>
			<div class="weui-cell__ft">
				<p>点击修改常用车型</p>
			</div>
		</div>
		<div class="weui-cell weui-cell_access" style="line-height:1" onclick="service()">
			<div class="weui-cell__hd"><i class="fa fa-volume-control-phone fa-lg" style="color: black;padding-top: 5px;padding-left:2px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<p>联系客服</p>
			</div>
			<div class="weui-cell__ft"></div>
		</div>
	</div>
</div>
<script>
	/*我的个人信息*/
	function personmessage() {
		location.href="/person/personmessage";
    }
	/*我的订单*/
	function order() {
        location.href="/person/order";
    }
	/*优惠券*/
	function coupon() {
        location.href="/person/coupon";
    }
	/*我的消息*/
	function mymessage() {
		location.href="/person/mymessage";
    }
    /*客服*/
    function service() {
        location.href="/person/phoneservice";
    }
    /*套餐*/
    function mytc() {
        location.href="/person/mytc";
    }
    /*登录*/
    function login() {
        location.href="/person/login";
    }
    /*退出登录*/
    function exitlogin() {
        $.confirm("您确定要退出吗", function() {
            location.href="/person/exitlogin";
        })
    }
    /*我的车型*/
    function mycar() {
        location.href="/person/carhome";
    }
    /*我的账户*/
    function myaccount() {
        location.href="/person/myaccount";
    }
    /*我的预约*/
    function myservbook() {
        location.href="/person/myservbook";
    }
</script>
</body>
</html>
